<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增跟进记录')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-followup-add">
            <input id="studentId" name="studentId"  type="hidden"  th:value="${studentId}" />
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">跟进时间：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
<!--                            <input name="followUpTime" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
                            <input name="followUpTime" type="text" class="form-control" id="follow-up-time" placeholder="yyyy-MM-dd HH:mm:ss">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
<!--                <div class="form-group">-->
<!--                    <label class="font-noraml">显示年月日时分秒</label>-->
<!--                    <div class="input-group date">-->
<!--                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
<!--                        <input type="text" class="form-control" id="laydate-demo-3" placeholder="yyyy-MM-dd HH:mm:ss">-->
<!--                    </div>-->
<!--                </div>-->
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">跟进方式：</label>
                    <div class="col-sm-8">
                        <select name="followUpContactCode" class="form-control" th:with="type=${@dict.getType('crm_contact_code')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">跟进记录：</label>
                    <div class="col-sm-8">
                        <textarea name="followUpRecords" class="form-control" rows="6"></textarea>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/student/followup"
        $("#form-followup-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-followup-add').serialize());
            }
        }


        $(function(){
            <!-- laydate -->
            layui.use('laydate', function(){
                var laydate = layui.laydate;
                laydate.render({
                    elem: '#follow-up-time',
                    type: 'datetime',
                    value: new Date(),
                    isInitValue: true,
                    trigger: 'click'
                });
            });
        });
    </script>
</body>
</html>